<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>LGlobal.hitPolygon</title>
		<script type="text/javascript" src="../load_lufylegend.js"></script>
	</head>
	<body style="margin: 0;padding: 0;">
			<div id="legend">
			</div>
			<script>
			LInit(1000/60, "legend", 800,480, main);
			function main () {
				LGlobal.setDebug(true);
				var layer = new LSprite();
				addChild(layer);
				var vertices = [[50,100],[150,50],[100,150]];
				layer.graphics.drawVertices(1,"#000000",vertices);
				var point1 = [100,100];
				layer.graphics.drawArc(1,"#000000",[point1[0],point1[1],2,0,2*Math.PI]);
				var point2 = [50,200];
				layer.graphics.drawArc(1,"#000000",[point2[0],point2[1],2,0,2*Math.PI]);
				trace(LGlobal.hitPolygon(vertices,point1[0],point1[1]));//out:true
				trace(LGlobal.hitPolygon(vertices,point2[0],point2[1]));//out:false
			}
			</script>
	</body>
</html>